package edu.cueb.wmis.controller;


import edu.cueb.wmis.service.IAdminService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liuzizhuo
 * @since 2021-04-19
 */
@RestController
@RequestMapping("/admin")
public class AdminController {

    @Autowired
    private IAdminService adminService;

    @ApiOperation("根据用户Id得到用户名字")
    @GetMapping("/{aid}")
    public String getNameById(@PathVariable Integer aid){
        return adminService.getNameById(aid);
    }
}
